<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link href="./style.css" rel="stylesheet" />
  </head>
  <body>
    <section>
      <h2>JS Animation</h2>
      <div class="banner">
        <div class="blocks"></div>
      </div>
    </section>
    <script>
      const banner = document.getElementsByClassName("banner")[0];
      const blocks = document.getElementsByClassName("blocks");

      for (var i = 1; i < 400; i++) {
        banner.innerHTML += `<div class="blocks"></div>`;
        blocks[i].style.animationDelay = `${i * 0.05}s`;
      }
    </script>
  </body>
</html>
